<?php
/**************************************
 *
 * @services 服务层~点赞服务
 *
 **************************************/
namespace app\common\services;

use app\common\repositories\ClickRepositories;
use GuzzleHttp\Client;
use think\config;
use think\Env;
use think\Validate;
use Green\Request\V20170112 as Green;

class ClickServices
{
    protected $ClickRepositories;

    public function __construct()
    {
        $this->ClickRepositories = new ClickRepositories();
    }
    //点赞功能
    public function setClick($param)
    {
        //编辑公共数据点赞
        $msg = $this->ClickRepositories->setClick($param);
        if (is_array($msg)) {
            if (!empty($msg)) {
                return $msg;
            } else {
                return 400;
            }
        }
    }

    //专题关注功能
    public function setFollow($param)
    {
        //编辑公共数据点赞
        $msg = $this->ClickRepositories->setFollow($param);
        if (is_array($msg)) {
            if (!empty($msg)) {
                return $msg;
            } else {
                return 400;
            }
        }
    }

    //文章浏览量
    public function addView($param)
    {
        return $this->ClickRepositories->addView($param);
    }
}